from django.db import models

# Create your models here.
from django.db import models


class Status(models.TextChoices):
    UNSTARTED = 'u', "Not started yet"
    ONGOING = 'o', "Ongoing"
    FINISHED = 'f', "Finished"


class app_weather(models.Model):
    name = models.CharField(verbose_name="app_weather name", max_length=65, unique=True)
    status = models.CharField(verbose_name="app_weather status", max_length=1, choices=Status.choices)

    class Meta:
        verbose_name = "任务"
        verbose_name_plural = "任务"

    def __str__(self):
        return self.name
class QueryWeather(models.Model):
    city = models.CharField(max_length=255, blank=True, null=True)
    date = models.DateTimeField(blank=True, null=True)
    week = models.CharField(max_length=255, blank=True, null=True)
    update_time = models.CharField(max_length=255, null=True)
    weather = models.CharField(max_length=255, blank=True, null=True)
    tem = models.CharField(max_length=255, blank=True, null=True)
    tem_day = models.CharField(max_length=255, blank=True, null=True)
    tem_night = models.CharField(max_length=255, blank=True, null=True)
    win = models.CharField(max_length=255, blank=True, null=True)
    win_speed = models.CharField(max_length=255, blank=True, null=True)
    win_meter = models.CharField(max_length=255, blank=True, null=True)
    air = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'query_weather'
